#include<stdio.h>

int differ_2_3(int num);
int main(void)
{
	int han,ten,one,num,flag;
	
	for(int i=1;i<10;i++)
	{
		for(int j=1;j<10;j++)
		{
			if(i==j)
			{
				continue;
			}
			for(int k=1;k<10;k++)
			{
				if(j==k||i==k)
				{
					continue;
				}
				num=100*i+10*j+k;
				if(num<=333)
				{
					if(differ_2_3(num))
					{
						printf("%d %d %d\n",num,2*num,3*num);
					}
				}	
			}
		}
	}
	
	return 0;
}
int differ_2_3(int num)
{
	int a,b,c,a2,b2,c2,a3,b3,c3;
	
	a=num%10;
	b=num/10%10;
	c=num/100%10;
	
	a2=num*2%10;
	b2=num*2/10%10;
	c2=num*2/100%10;
	
	if(a2==b2||a2==c2||b2==c2)
	{
		return 0;
	}
	
	a3=num*3%10;
	b3=num*3/10%10;
	c3=num*3/100%10;
	
	if(a3==b3||a3==c3||b3==c3)
	{
		return 0;
	}
	
	if(a*b*c*a2*b2*c2*a3*b3*c3==0)
	{
		return 0;
	}
	
	if(a==a2||a==a3||a==b2||a==b3||a==c2||a==c3||b==a2||b==a3||b==b2||b==b3||b==c2||b==c3||c==a2||c==a3||c==b2||c==b3||c==c2||c==c3||a2==a3||a2==b3||a2==c3||b2==a3||b2==b3||b2==c3||c2==a3||c2==b3||c2==c3)
	{
		return 0;
	}
	return 1;
}
